
package testSudoku;

import static org.junit.Assert.*;

import org.junit.Test;
import sudoku.easy_qustion;
public class testEasy_question {

	// Test case 1: test class "Easy_question":  test question1
	@Test
	public void testquestion1() 
	{
		easy_qustion question =new easy_qustion();	
		char[][][] quest = question.get_questn();
		char [][]result = new char[][] {
				{'4','6','3','2',' ','9','7','1','8'},//array[0][0-8]
				{'7',' ',' ',' ',' ',' ',' ',' ','5'},//array[1][0-8]
				{'8',' ','5','7',' ','3','6',' ','2'},//array[2][0-8]
				{'3',' ','8','6',' ','2','5',' ','1'},//array[3][0-8]
				{' ','7',' ',' ','4',' ',' ','6',' '},//array[4][0-8]
				{'6',' ','2','3',' ','1','4',' ','9'},//array[5][0-8]
				{'2',' ','7','9',' ','4','1',' ','6'},//array[6][0-8]
				{'9',' ',' ',' ',' ',' ',' ',' ','4'},//array[7][0-8]
				{'5','8','4','1',' ','6','3','9','7'} //array[8][0-8]
		};
		
	
		assertArrayEquals(result, quest[0]);
	}
	
	
	// Test case 2: test class "Easy_question":  test question2
	@Test
	public void testquestion2() 
	{
		easy_qustion question =new easy_qustion();	
		char[][][] quest = question.get_questn();
		char [][]result = new char[][] {
				{' ','5',' ','2','7','6',' ','3','9'},
				{' ','7','1',' ','4',' ',' ','2','5'},
				{'9',' ','2','1',' ','5',' ','4',' '},
				{' ',' ','3',' ',' ','1',' ',' ','4'},
				{'5',' ','6','4',' ','8','2',' ','1'},
				{'1',' ',' ','5',' ',' ','3',' ',' '},
				{' ','1',' ','7',' ','2','4',' ','8'},
				{'4','6',' ',' ','5',' ','7','1',' '},
				{'2','8',' ','6',' ','4','9','5',' '}
		};
		
	
		assertArrayEquals(result, quest[1]);
	}
	
	
	// Test case 3: test class "Easy_question":  test question3
	@Test
	public void testquestion3() 
	{
		easy_qustion question =new easy_qustion();	
		char[][][] quest = question.get_questn();
		char [][]result = new char[][] {
				{'4','2',' ','6','7',' ',' ','9','1'},
				{'7',' ','9','5','4','1',' ',' ','6'},
				{' ','5','6','9',' ',' ','7',' ',' '},
				{'3','7','5',' ',' ','6',' ','2',' '},
				{'2','6',' ',' ','9',' ',' ','5','3'},
				{' ','8',' ','2',' ',' ','6','1','7'},
				{' ',' ','3',' ',' ','7','9','6',' '},
				{'5',' ',' ','1','6','8','3',' ','2'},
				{'6','4',' ',' ','5','9',' ','7','8'}	
		};
		
	
		assertArrayEquals(result, quest[2]);
	}
	
	
	
	// Test case 4: test class "Easy_question":  test solution1
	@Test
	public void testsolution1() 
	{
		easy_qustion question =new easy_qustion();	
		char[][][] sol = question.get_sol();
		char [][]result = new char[][] {
				{'4','6','3','2','5','9','7','1','8'},
				{'7','2','1','4','6','8','9','3','5'},
				{'8','9','5','7','1','3','6','4','2'},
				{'3','4','8','6','9','2','5','7','1'},
				{'1','7','9','8','4','5','2','6','3'},
				{'6','5','2','3','7','1','4','8','9'},
				{'2','3','7','9','8','4','1','5','6'},
				{'9','1','6','5','3','7','8','2','4'},
				{'5','8','4','1','2','6','3','9','7'}
		};
		
	
		assertArrayEquals(result, sol[0]);
	}
	
	
	
	// Test case 5: test class "Easy_question":  test solution2
	@Test
	public void testsolution2() 
	{
		easy_qustion question =new easy_qustion();	
		char[][][] sol = question.get_sol();
		char [][]result = new char[][] {
				{'8','5','4','2','7','6','1','3','9'},
				{'6','7','1','3','4','9','8','2','5'},
				{'9','3','2','1','8','5','6','4','7'},
				{'7','2','3','9','6','1','5','8','4'},
				{'5','9','6','4','3','8','2','7','1'},
				{'1','4','8','5','2','7','3','9','6'},
				{'3','1','5','7','9','2','4','6','8'},
				{'4','6','9','8','5','3','7','1','2'},
				{'2','8','7','6','1','4','9','5','3'}
		};
		
	
		assertArrayEquals(result, sol[1]);
	}
	
	
	
	// Test case 6: test class "Easy_question":  test solution3
	@Test
	public void testsolution3() 
	{
		easy_qustion question =new easy_qustion();	
		char[][][] sol = question.get_sol();
		char [][]result = new char[][] {
				{'4','2','8','6','7','3','5','9','1'},
				{'7','3','9','5','4','1','2','8','6'},
				{'1','5','6','9','8','2','7','3','4'},
				{'3','7','5','8','1','6','4','2','9'},
				{'2','6','1','7','9','4','8','5','3'},
				{'9','8','4','2','3','5','6','1','7'},
				{'8','1','3','4','2','7','9','6','5'},
				{'5','9','7','1','6','8','3','4','2'},
				{'6','4','2','3','5','9','1','7','8'}
		};
		
	
		assertArrayEquals(result, sol[2]);
	}
	
	
}
